<template>
  <view class="agreement-container">
    <view class="agreement-header">
      <text class="title">User Agreement</text>
    </view>
    
    <view class="agreement-content">
      <scroll-view scroll-y="true" class="content-scroll">
        <text class="content-text">{{ agreementContent }}</text>
      </scroll-view>
    </view>
    
    <view class="agreement-footer">
      <button class="back-button" @click="goBack">Back</button>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      agreementContent: `
END USER LICENSE AGREEMENT

Last updated: ${new Date().toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' })}

This End User License Agreement ("Agreement") is a legal agreement between you (either an individual or a single entity) and our company for the software application BabaHabibi (the "Software").

BY INSTALLING, COPYING, OR OTHERWISE USING THE SOFTWARE, YOU AGREE TO BE BOUND BY THE TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, DO NOT INSTALL OR USE THE SOFTWARE.

1. GRANT OF LICENSE
We grant you a non-exclusive, non-transferable license to use the Software on devices that you own or control, solely for your personal use in accordance with the terms of this Agreement.

2. RESTRICTIONS
You agree not to:
- Copy, modify, or create derivative works of the Software
- Rent, lease, lend, sell, sublicense, or distribute the Software
- Reverse engineer, decompile, or disassemble the Software
- Remove any proprietary notices or labels on the Software

3. OWNERSHIP
The Software is owned and copyrighted by our company. This Agreement does not grant you any ownership rights in the Software.

4. TERMINATION
This Agreement is effective until terminated. Your rights under this Agreement will terminate automatically without notice if you fail to comply with any term of this Agreement.

5. DISCLAIMER OF WARRANTIES
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

6. LIMITATION OF LIABILITY
IN NO EVENT SHALL OUR COMPANY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE.

7. GOVERNING LAW
This Agreement shall be governed by the laws of [Your Country/State], without regard to conflict of law principles.

8. CHANGES TO TERMS
We reserve the right to modify these terms at any time. You should review this Agreement periodically for changes.

9. CONTACT INFORMATION
If you have any questions about this Agreement, please contact us at:
Email: support@babahabibi.com
      `
    };
  },
  
  methods: {
    goBack() {
      uni.navigateBack();
    }
  }
};
</script>

<style scoped>
.agreement-container {
  padding: 20rpx;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.agreement-header {
  text-align: center;
  padding: 20rpx 0;
  border-bottom: 2rpx solid #eee;
}

.title {
  font-size: 42rpx;
  font-weight: bold;
  color: #333;
}

.agreement-content {
  flex: 1;
  margin: 20rpx 0;
}

.content-scroll {
  height: 100%;
}

.content-text {
  font-size: 28rpx;
  line-height: 42rpx;
  color: #666;
  white-space: pre-line;
}

.agreement-footer {
  padding: 20rpx 0;
  border-top: 2rpx solid #eee;
}

.back-button {
  background-color: #FA751F;
  color: white;
  border-radius: 50rpx;
  height: 80rpx;
  line-height: 80rpx;
  font-size: 32rpx;
}
</style>